<template>
    <div class="localmusic">
        <div class="header space-between padding-24 bg-active">
            <div class="h-back" @click="goBack"><img :src="back" alt=""></div>
            <div class="fs-32 color-f" :class="{active:cur==1}" @click="select(1)">歌曲&nbsp;<span class="color-f fs-28">44</span></div>
            <div class="fs-32 color-f" :class="{active:cur==2}" @click="select(2)">歌手&nbsp;<span class="color-f fs-28">11</span></div>
            <div class="fs-32 color-f" :class="{active:cur==3}" @click="select(3)">专辑&nbsp;<span class="color-f fs-28">44</span></div>
            <div class="h-right"><img :src="play" alt=""></div> 
        </div>
        <div class="contents bg-f">
            <div class="song" v-if="cur==1">
                <div class="top-search padding-24">
                    <div class="search">
                        <input type="text" placeholder="搜索本地歌曲" id="input">
                    </div>
                </div>
                <div class="music-list">
                    <div class="song-list" >
                        <div class="title space-between">
                            <div class="left space-between">
                            <span class="icon">
                                <img :src="playAll" alt />
                            </span>
                            <span class="tit fs-36" @click="plays">全部播放</span>
                            
                            </div>
                            <div class="right space-between" >
                            <span class="icon">
                                <img :src="operate" alt />
                            </span>
                            <span class="txt fs-28" >批量操作</span>
                            </div>
                            
                        </div>
                        <div class="list space-between" v-for="item in songList" :key="item.id">
                            <div class="left">
                                <span class="song-name fs-36 overFlow">{{item.music_name}}</span>
                                <span class="mes overFlow fs-26 color-9">
                                    {{item.singer_name}} - {{item.music_list_name}}
                                </span>
                            </div>
                            <div class="right">
                                
                                <span class="more" >
                                    <img :src="moreMes" alt />
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="songer" v-if="cur==2">
                <div class="top-search padding-24">
                    <div class="search">
                        <input type="text" placeholder="搜索歌手">
                    </div>
                </div>
                <div class="list">
                    <div class="list-item padding-24 center-col" v-for="(item,index) in singerlist" :key="index" @click="gotosingersong(item)">
                        <div class="left">
                            <img :src="item.cove" alt="" class="cove yuan">
                            <div class="loge" v-if="item.is_singer==1||item.is_vip==1">
                                <img :src="musicer" alt="" v-if="item.is_singer==1">
                                <img :src="vip" alt="" v-if="item.is_vip==1&&item.is_singer!=1">
                            </div>
                        </div>
                        <div class="right flex-column">
                            <p class="fs-32">{{item.name}}</p>
                            <p class="fs-24 color-6">{{item.num}}首</p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="zhji" v-if="cur==3">
                <div class="top-search padding-24">
                    <div class="search">
                        <input type="text" placeholder="搜索专辑">
                    </div>
                </div>
                <div class="list">
                    <div class="list-item padding-24 center-col" v-for="(item,index) in zhjilist" :key="index">
                        <img :src="item.cove" alt="">
                        <div class="right flex-column">
                            <p class="fs-32">{{item.name}}</p>
                            <p class="fs-22 color-9">{{item.title}},{{item.num}}首</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    data(){
        return{
            cur:1,
            back:require('../../assets/index/back.png'),
            play:require('../../assets/index/play.png'),
            playAll: require("@/assets/index/playAll.png"),
            operate: require("@/assets/index/operate.png"),
            moreMes: require("@/assets/index/moreMes.png"),
            musicer:require('../../assets/account/musicer.png'),
            vip:require('../../assets/account/vip.png'),
            songList:[
                {
                    music_name:'问过防火门  个不放过 鬼地方个',
                    singer_name:'申达股',
                    music_list_name:'万恶高蛋白不放过'
                },
                {
                    music_name:'问过防火门  个不放过 鬼地方个',
                    singer_name:'申达股',
                    music_list_name:'万恶高蛋白不放过'
                }
            ],
            singerlist:[
                {
                    cove:require("../../assets/image/cove.png"),
                    is_singer:1,
                    is_vip:1,
                    name:'个人股',
                    num:45,
                },
                {
                    cove:require("../../assets/image/cove.png"),
                    is_singer:1,
                    is_vip:1,
                    name:'个人股',
                    num:45,
                }
            ],
            zhjilist:[
                {
                    cove:require("../../assets/image/ranka.png"),
                    name:'林宥嘉别让我走远',
                    title:'冬天',
                    num:1,
                },
                {
                    cove:require("../../assets/image/ranka.png"),
                    name:'林宥嘉别让我走远',
                    title:'冬天',
                    num:1,
                }
            ]
        }
    },
    created(){

    },
    methods:{
        goBack(){
            this.$router.go(-1);
        },
        select(i){
            this.cur=i
        },
        gotosingersong(i){
            this.$router.push({
                path: '/localsingersong',
                query: {
                    user_id: i.name,
                }
            })
        },
        plays(){
            // console.log('888')
            // document.getElementById('input').focus()
            // console.log('999')
        }
    }
}
</script>
<style lang="scss">
.localmusic{
    .header{
        width: 100%;
        height: 1rem;
        .h-back{
            width: 0.15rem;
            height: 0.26rem;
            img{
                width: 100%;
            }
        }
        .title{
            font-size: 0.36rem;
            font-weight: bold;
        }
        .active{
            font-size: 0.36rem;
            font-weight: bold
        }
        .h-right{
            width: 0.38rem;
            height: 0.5rem;
            img{
                display: inline-block;
                width: 100%;
            }
        }
    }
    .contents{
        margin-top: 1rem;
        padding-top: 0.2rem;
        box-sizing: border-box;
        .song{
            width: 100%;
            .top-search{
                height: 0.6rem;
                .search{
                    width: 100%;
                    height: 100%;
                    border-radius: 0.3rem;
                    border: 0.01rem solid #e9e9e9;
                    padding: 0 0.2rem;
                    box-sizing: border-box;
                    input{
                        width: 100%;
                        height: 100%;
                        text-align: center;
                        font-size: 0.32rem;
                    }
                }
            }
            .music-list{
                margin-top: 0.3rem;
                width: 100%;
                height: auto;
                .song-list {
                    padding: 0.46rem 0.27rem 1.5rem;
                    background-color: #fff;
                    box-sizing: border-box;
                    .title {
                    margin-bottom: 0.2rem;
                    .left {
                        .icon {
                        width: 0.38rem;
                        height: 0.38rem;
                        margin-right: 0.16rem;
                        img {
                            width: 100%;
                        }
                        }
                        .tit {
                        font-weight: bold;
                        color: rgba(68, 68, 68, 1);
                        line-height: 0.36rem;
                        margin-right: 0.32rem;
                        }
                        .num {
                        font-weight: 500;
                        color: rgba(153, 153, 153, 1);
                        // line-height:36px;
                        }
                    }
                    .right {
                        .icon {
                        width: 0.28rem;
                        height: 0.3rem;
                        margin-right: 0.15rem;
                        img {
                            width: 100%;
                        }
                        }
                        .txt {
                        font-weight: 800;
                        color: rgba(68, 68, 68, 1);
                        line-height: 0.36rem;
                        }
                    }
                    }
                    .list {
                    display: flex;
                    flex-direction: row;
                    padding: 0.41rem 0 0.38rem;
                    box-sizing: border-box;
                    border-bottom: 0.01rem solid #e9e9e9;
                    .left {
                        display: flex;
                        flex-direction: column;
                        .song-name {
                        font-weight: 500;
                        color: rgba(68, 68, 68, 1);
                        line-height: 0.36rem;
                        margin-bottom: 0.22rem;
                        }
                        .mes {
                        display: table-cell;
                        vertical-align: middle;
                        img {
                            width: 0.3rem;
                            height: 0.3rem;
                            vertical-align: middle;
                            display: inline-block;
                            margin-right: 0.11rem;
                        }
                        .txt {
                            font-weight: 500;
                            color: rgba(153, 153, 153, 1);
                            line-height: 0.36rem;
                        }
                        }
                    }
                    .right {
                         img {
                            width: 0.08rem;
                            height: 0.36rem;
                        }
                        
                        }
                    }
                }
            }
        }
        .songer{
            width: 100%;
            .top-search{
                height: 0.6rem;
                .search{
                    width: 100%;
                    height: 100%;
                    border-radius: 0.3rem;
                    border: 0.01rem solid #e9e9e9;
                    padding: 0 0.2rem;
                    box-sizing: border-box;
                    input{
                        width: 100%;
                        height: 100%;
                        text-align: center;
                        font-size: 0.32rem;
                    }
                }
            }
            .list{
                width: 100%;
                height: auto;
                margin-top: 0.3rem;
                .list-item{
                    height: 1.2rem;
                    border-bottom: 0.01rem solid #e9e9e9;
                    .left{
                        position: relative;
                        width: 0.9rem;
                        height: 0.9rem;
                        margin-right: 0.3rem;
                        .cove{
                            width: 0.9rem;
                            height: 0.9rem;
                        }
                        .loge{
                            width: 0.32rem;
                            height: 0.32rem;
                            position: absolute;
                            border-radius: 50%;
                            bottom: 0;
                            right: 0;
                            img{
                                width: 100%;
                                height: 100%;
                            }
                        }
                    }
                    .right{
                        height: 0.9rem;
                    }
                }
            }
        }
        .zhji{
            width: 100%;
            .top-search{
                height: 0.6rem;
                .search{
                    width: 100%;
                    height: 100%;
                    border-radius: 0.3rem;
                    border: 0.01rem solid #e9e9e9;
                    padding: 0 0.2rem;
                    box-sizing: border-box;
                    input{
                        width: 100%;
                        height: 100%;
                        text-align: center;
                        font-size: 0.32rem;
                    }
                }
            }
            .list{
                width: 100%;
                height: auto;
                margin-top: 0.3rem;
                .list-item{
                    height: 1.8rem;
                    border-bottom: 0.01rem solid #e9e9e9;
                    img{
                        width: 1.5rem;
                        height: 1.5rem;
                        object-fit: cover;
                        border-radius: 0.12rem;
                        margin-right: 0.3rem;
                    }
                    .right{
                        height: 1.2rem;
                    }
                }
            }
        }
    }
}
</style>